<?php
error_reporting(0);
include_once('config.php');
define("SUCCESS", "10000");
define("ERROR", "10001");
$tmp = '';
$host_name = trim($_GET['hostname']);
$link = mysql_connect(Config::$db_host, Config::$db_user, Config::$db_pass) or die(ERROR);
mysql_select_db(Config::$db_name);
$result = mysql_query("SELECT domain FROM licence WHERE domain = '{$host_name}'");
while($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
	$tmp = $row['domain'];
	if(!empty($tmp))
	{
		die(SUCCESS);
	}
}
mysql_free_result($result);
die(ERROR);
?>